<?php

use Illuminate\Database\Seeder;
use App\Model\Prize;
class PrizeSeeder extends Seeder
{

    public $prize_list = [
        ['name' => '键盘', 'amount' => 0, 'left_interval' => 0, 'right_interval' => 0],
        ['name' => '耳机', 'amount' => 7, 'left_interval' => 0, 'right_interval' => 4],
        ['name' => '鼠标垫', 'amount' => 25, 'left_interval' => 4, 'right_interval' => 15],
        ['name' => '清洁套装', 'amount' => 16, 'left_interval' => 15, 'right_interval' => 23],
        ['name' => '卡贴', 'amount' => 100, 'left_interval' => 23, 'right_interval' => 43],
        ['name' => '随机礼品', 'amount' => 4, 'left_interval' => 43, 'right_interval' => 45],
        ['name' => '钥匙扣', 'amount' => 13, 'left_interval' => 45, 'right_interval' => 48],
        ['name' => '随机礼品', 'amount' => 2, 'left_interval' => 48, 'right_interval' => 49],
        ['name' => '安卓线', 'amount' => 2, 'left_interval' => 49, 'right_interval' => 50],
        ['name' => '卡贴', 'amount' => 100, 'left_interval' => 50, 'right_interval' => 70],
        ['name' => '分线器', 'amount' => 3, 'left_interval' =>70, 'right_interval' => 71],
        ['name' => '随机礼品', 'amount' => 2, 'left_interval' => 71, 'right_interval' => 73],
        ['name' => '谢谢参与', 'amount' => 100, 'left_interval' => 73, 'right_interval' => 101],
    ];

    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        foreach ($this->prize_list as $prize){
            Prize::create($prize);
        }
    }
}
